﻿using FaceWebServer.DB.Device;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FaceWebServer.Interface
{
    /// <summary>
    /// 设备操作服务
    /// </summary>
    public interface IFaceDriveService : IBaseService
    {
        DbSet<FaceDeviceDetail> GetDBSet();

        /// <summary>
        /// 获取设备默认参数的Json
        /// </summary>
        /// <returns></returns>
        FaceDeviceDetail GetDefaultValue();

        /// <summary>
        /// 根据SN查询设备详情
        /// </summary>
        /// <param name="sn"></param>
        /// <returns></returns>
        FaceDeviceDetail GetDetail(string sn);

        /// <summary>
        /// 更新缓存
        /// </summary>
        /// <param name="oDevice"></param>
        void UpdateCache(FaceDeviceDetail oDevice);

        /// <summary>
        /// 添加一个新设备
        /// </summary>
        /// <param name="oDevice"></param>
        /// <returns></returns>
        bool Add(FaceDeviceDetail oDevice);


        /// <summary>
        /// 获取设备任务详情
        /// </summary>
        /// <param name="sn"></param>
        /// <returns></returns>
        (int NewPeople, int DelPeople,int RemoteCount) GetTaskDetail(string sn);
        
    }
}
